package com.fch.sdlibrary.service;

import com.fch.sdlibrary.entity.Book;
import com.fch.sdlibrary.entity.BookClazz;
import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * @program: sdlibrarySpring
 * @description: 图书服务接口
 * @CreatedBy: fch
 * @create: 2022-05-06 20:13
 **/
public interface BookService {
    List<Book> queryAllBooks();

    Book queryBookById(String id);

    PageInfo<Book> queryAllBooksByPage(Integer pageNum, Integer pageSize);

    List<BookClazz> queryAllBookClazz();

    PageInfo<Book> searchBookByNameAndClazz(Book book, Integer pageNum, Integer pageSize);

    PageInfo<Book> searchBookByIsbn(Book book, Integer pageNum, Integer pageSize);

    boolean canBorrow(String bookId);

    Book addToBook(Book book);

    int updateImg(Book book);

    Book updateBook(Book book);
}
